Skip to content

adds get_user_profile()#2

Merged
Googolplexed0 merged 1 commit intoGoogolplexed0:mainfrom
DerKO9:main
Apr 26, 2026
Merged

adds get_user_profile()#2
Googolplexed0 merged 1 commit intoGoogolplexed0:mainfrom
DerKO9:main

Conversation

@DerKO9
Copy link
Copy Markdown

@DerKO9 DerKO9 commented Apr 16, 2026

This adds the get_user_profile() that can be found in the other librespot implementations, such as:
Rust (https://github.com/librespot-org/librespot/blob/33bf3a77ed4b549df67e8347d7d6e55b007b3ec2/core/src/spclient.rs#L675)
or
Java (https://github.com/librespot-org/librespot-java/blob/52a8c24215e5a9b921da8e7219c49937ec87ed88/lib/src/main/java/xyz/gianlu/librespot/dealer/ApiClient.java#L254)

This tries to write the same function in python. The response is a JSON object instead of a protobuf response and looks something like this:

{
  "uri": "spotify:user:[USER_ID]",
  "name": "[USER_DISPLAY_NAME]",
  "public_playlists": [
    {
      "uri": "spotify:playlist:[PLAYLIST_ID]",
      "name": "test",
      "image_url": "spotify:image:ab67616d00001e0208fdcdc2c63b05d8be1b7d61",
      "followers_count": 1,
      "owner_name": "[USER_DISPLAY_NAME]",
      "owner_uri": "spotify:user:[USER_ID]",
      "is_following": true
    },
    {
      "uri": "spotify:playlist:[PLAYLIST_ID]",
      "name": "test2",
      "image_url": "spotify:image:ab67616d00001e0232f1572738340ddc9569c54b",
      "owner_name": "[USER_DISPLAY_NAME]",
      "owner_uri": "spotify:user:[USER_ID]",
      "is_following": true
    },
    {
      "uri": "spotify:playlist:[PLAYLIST_ID]",
      "name": "test3",
      "image_url": "spotify:mosaic:ab67616d00001e024803dc88ae15cc228778477a:ab67616d00001e024ac2d979712c58dcc49290e0:ab67616d00001e0290c9072fbd484299e0f624ca:ab67616d00001e02bbf6867de49bfcc7c7dd8229",
      "owner_name": "[USER_DISPLAY_NAME]",
      "owner_uri": "spotify:user:[USER_ID]",
      "is_following": true
    }
  ],
  "total_public_playlists_count": 5,
  "is_current_user": true,
  "has_spotify_name": true,
  "color": 11836360,
  "allow_follows": true,
  "show_follows": true
}

Copy link
Copy Markdown
Owner

@Googolplexed0 Googolplexed0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Googolplexed0 Googolplexed0 merged commit 4c97ded into Googolplexed0:main Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants